package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import flc.ast.BaseAc;
import flc.ast.R;
import flc.ast.databinding.ActivityTimeWidgetBinding;
import stark.common.basic.event.EventStatProxy;

public class TimeWidgetActivity extends BaseAc<ActivityTimeWidgetBinding> {


    @Override
    protected int onCreate() {
        return R.layout.activity_time_widget;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent1(this, mDataBinding.event1Container);

        mDataBinding.ivTimeWidgetBack.setOnClickListener(v -> onBackPressed());

        //时间组件
        mDataBinding.llIncludeTime1.setOnClickListener(this);
        mDataBinding.llIncludeTime2.setOnClickListener(this);
        mDataBinding.llIncludeTime3.setOnClickListener(this);
        mDataBinding.llIncludeTime4.setOnClickListener(this);
        mDataBinding.llIncludeTime5.setOnClickListener(this);
        mDataBinding.llIncludeTime6.setOnClickListener(this);
        mDataBinding.llIncludeTime7.setOnClickListener(this);
        mDataBinding.llIncludeTime8.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()) {
            case R.id.llIncludeTime1:
                EditTimeActivity.start(mContext, 1, null);
                break;
            case R.id.llIncludeTime2:
                EditTimeActivity.start(mContext, 2, null);
                break;
            case R.id.llIncludeTime3:
                EditTimeActivity.start(mContext, 3, null);
                break;
            case R.id.llIncludeTime4:
                EditTimeActivity.start(mContext, 4, null);
                break;
            case R.id.llIncludeTime5:
                EditTimeActivity.start(mContext, 5, null);
                break;
            case R.id.llIncludeTime6:
                EditTimeActivity.start(mContext, 6, null);
                break;
            case R.id.llIncludeTime7:
                EditTimeActivity.start(mContext, 7, null);
                break;
            case R.id.llIncludeTime8:
                EditTimeActivity.start(mContext, 8, null);
                break;
            default:
                break;
        }
    }

    @Override
    protected void initData() {

    }
}